var MCModels = Class.create({ 
	initialize: function() { 

	}
});

MCModels.couponList = [];
MCModels.couponIndex = 0;
MCModels.buyList = [];


MCModels.getBuyList = function() {
	
	MCModels.buyList = [];
	
	if (MCModels.couponList.length>0) {
		for (var i = 0 ; i<MCModels.couponList.length ; i++) {
			if (MCModels.couponList[i].checked == true) {
				var buyItem = MCModels.couponList[i];
				MCModels.buyList.push(buyItem);
			}
		}
		
		for (var i=0; i<MCModels.buyList.length; i++) {
			MCModels.buyList[i].disabled=true;
		}
	} else {
		MCModels.buyList = [];
	}
	
	return MCModels.buyList;
}

MCModels.getCouponList = function() {
	
	if (MCModels.couponList.length>0) {
		for (var i = 0 ; i<MCModels.couponList.length ; i++) {
			MCModels.couponList[i].disabled=false;
		}
	}

	return MCModels.couponList;
}